#pragma once



#include "gameObject.h"
#include "blob.h"
#include "ofMain.h"
#include "ofxVectorMath.h"
#include "src/testApp.h"

class blob;

class explosionParticle :
	public gameObject
{
public:
	explosionParticle(ofxVec2f pos);
	~explosionParticle(void);

	blob* target;

	ofxVec2f targetPos;

	ofxVec2f velocity;
	float acceleration;
	float friction;
	float timeToDie;
	bool dead;
	bool fadedOut;
	float fadeAlphaMod;
	bool gaveMass;
	bool lost;
	float maxVelocity;
	void draw();
	int update();

	void updateAndDraw(ofxVec2f newTarget, bool fadedOut, float fadeAlphaMass);

	float radius;

    void kill();

	void explode();

    void setTarget(blob* newTarget);
    void setTarget(ofxVec2f newTarget);
};

